Skip to contentSkip to conversation

Change in openvpn[master]: forward: Make sure pip flags are treated as unsigned

Openvpn-devel In review flichtenheld (Code Review) 2 participants 7 messages Jul 24, 2025 – Sep 1, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1753360288000.I6d42c67b8dc5512933bed482bd9c2be80c63e993@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email

to review the following change.

Change subject: forward: Make sure pip flags are treated as unsigned
......................................................................

forward: Make sure pip flags are treated as unsigned

process_ip_header already expects them to be unsigned, make sure the flags are to avoid spurious conversion warnings.

Change-Id I6d42c67b8dc5512933bed482bd9c2be80c63e993

---
M src/openvpn/forward.h

1 file changed, 7 insertions(+), 7 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/08/1108/1

src/openvpn/forward.h +7 -7
index 2818fd1..b3e424c 100644
@@ -318,13 +318,13 @@
  */
 void reschedule_multi_process(struct context *c);
 
-#define PIPV4_PASSTOS                   (1<<0)
-#define PIP_MSSFIX                      (1<<1)         /* v4 and v6 */
-#define PIP_OUTGOING                    (1<<2)
-#define PIPV4_EXTRACT_DHCP_ROUTER       (1<<3)
-#define PIPV4_CLIENT_NAT                (1<<4)
-#define PIPV6_ICMP_NOHOST_CLIENT        (1<<5)
-#define PIPV6_ICMP_NOHOST_SERVER        (1<<6)
+#define PIPV4_PASSTOS                   (1u<<0)
+#define PIP_MSSFIX                      (1u<<1)         /* v4 and v6 */
+#define PIP_OUTGOING                    (1u<<2)
+#define PIPV4_EXTRACT_DHCP_ROUTER       (1u<<3)
+#define PIPV4_CLIENT_NAT                (1u<<4)
+#define PIPV6_ICMP_NOHOST_CLIENT        (1u<<5)
+#define PIPV6_ICMP_NOHOST_SERVER        (1u<<6)
 
 
 void process_ip_header(struct context *c, unsigned int flags, struct buffer *buf,

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6d42c67b8dc5512933bed482bd9c2be80c63e993
Gerrit-Change-Number: 1108
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email

to look at the new patch set (#4).

Change subject: forward: Make sure pip flags are treated as unsigned
......................................................................

forward: Make sure pip flags are treated as unsigned

process_ip_header already expects them to be unsigned, make sure the flags are to avoid spurious conversion warnings.

Change-Id I6d42c67b8dc5512933bed482bd9c2be80c63e993

---
M src/openvpn/forward.h

1 file changed, 7 insertions(+), 7 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/08/1108/4

src/openvpn/forward.h +7 -7
index d564149..79d0f8b 100644
@@ -314,13 +314,13 @@
  */
 void reschedule_multi_process(struct context *c);
 
-#define PIPV4_PASSTOS             (1 << 0)
-#define PIP_MSSFIX                (1 << 1) /* v4 and v6 */
-#define PIP_OUTGOING              (1 << 2)
-#define PIPV4_EXTRACT_DHCP_ROUTER (1 << 3)
-#define PIPV4_CLIENT_NAT          (1 << 4)
-#define PIPV6_ICMP_NOHOST_CLIENT  (1 << 5)
-#define PIPV6_ICMP_NOHOST_SERVER  (1 << 6)
+#define PIPV4_PASSTOS             (1u << 0)
+#define PIP_MSSFIX                (1u << 1) /* v4 and v6 */
+#define PIP_OUTGOING              (1u << 2)
+#define PIPV4_EXTRACT_DHCP_ROUTER (1u << 3)
+#define PIPV4_CLIENT_NAT          (1u << 4)
+#define PIPV6_ICMP_NOHOST_CLIENT  (1u << 5)
+#define PIPV6_ICMP_NOHOST_SERVER  (1u << 6)
 
 
 void process_ip_header(struct context *c, unsigned int flags, struct buffer *buf,

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6d42c67b8dc5512933bed482bd9c2be80c63e993
Gerrit-Change-Number: 1108
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newpatchset

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email )

Change subject: forward: Make sure pip flags are treated as unsigned
......................................................................

Patch Set 10: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6d42c67b8dc5512933bed482bd9c2be80c63e993
Gerrit-Change-Number: 1108
Gerrit-PatchSet: 10
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 01 Sep 2025 19:45:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#4 lore raw

PATCH v10 1/1 forward: Make sure pip flags are treated as unsigned

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

process_ip_header already expects them to be unsigned, make sure the flags are to avoid spurious conversion warnings.

Change-Id I6d42c67b8dc5512933bed482bd9c2be80c63e993

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1108
This mail reflects revision 10 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

src/openvpn/forward.h +7 -7
index d564149..79d0f8b 100644
@@ -314,13 +314,13 @@
  */
 void reschedule_multi_process(struct context *c);
 
-#define PIPV4_PASSTOS             (1 << 0)
-#define PIP_MSSFIX                (1 << 1) /* v4 and v6 */
-#define PIP_OUTGOING              (1 << 2)
-#define PIPV4_EXTRACT_DHCP_ROUTER (1 << 3)
-#define PIPV4_CLIENT_NAT          (1 << 4)
-#define PIPV6_ICMP_NOHOST_CLIENT  (1 << 5)
-#define PIPV6_ICMP_NOHOST_SERVER  (1 << 6)
+#define PIPV4_PASSTOS             (1u << 0)
+#define PIP_MSSFIX                (1u << 1) /* v4 and v6 */
+#define PIP_OUTGOING              (1u << 2)
+#define PIPV4_EXTRACT_DHCP_ROUTER (1u << 3)
+#define PIPV4_CLIENT_NAT          (1u << 4)
+#define PIPV6_ICMP_NOHOST_CLIENT  (1u << 5)
+#define PIPV6_ICMP_NOHOST_SERVER  (1u << 6)
 
 
 void process_ip_header(struct context *c, unsigned int flags, struct buffer *buf,
#5 lore raw

[Openvpn-devel] [PATCH applied] Re: forward: Make sure pip flags are treated as unsigned

One of the easy ones, again. Well constrained numbers, and all users already do "unsigned". Tested by BB.

Your patch has been applied to the master branch.

commit 10476e240fcbaa1240ee04e2a6ae52a9cc0cea14

Author: Frank Lichtenheld
Date:   Mon Sep 1 21:45:25 2025 +0200
     forward: Make sure pip flags are treated as unsigned

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg32740.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#6 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#11) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: forward: Make sure pip flags are treated as unsigned
......................................................................

forward: Make sure pip flags are treated as unsigned

process_ip_header already expects them to be unsigned, make sure the flags are to avoid spurious conversion warnings.

Change-Id I6d42c67b8dc5512933bed482bd9c2be80c63e993

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32740.html

---
M src/openvpn/forward.h

1 file changed, 7 insertions(+), 7 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/08/1108/11

src/openvpn/forward.h +7 -7
index d564149..79d0f8b 100644
@@ -314,13 +314,13 @@
  */
 void reschedule_multi_process(struct context *c);
 
-#define PIPV4_PASSTOS             (1 << 0)
-#define PIP_MSSFIX                (1 << 1) /* v4 and v6 */
-#define PIP_OUTGOING              (1 << 2)
-#define PIPV4_EXTRACT_DHCP_ROUTER (1 << 3)
-#define PIPV4_CLIENT_NAT          (1 << 4)
-#define PIPV6_ICMP_NOHOST_CLIENT  (1 << 5)
-#define PIPV6_ICMP_NOHOST_SERVER  (1 << 6)
+#define PIPV4_PASSTOS             (1u << 0)
+#define PIP_MSSFIX                (1u << 1) /* v4 and v6 */
+#define PIP_OUTGOING              (1u << 2)
+#define PIPV4_EXTRACT_DHCP_ROUTER (1u << 3)
+#define PIPV4_CLIENT_NAT          (1u << 4)
+#define PIPV6_ICMP_NOHOST_CLIENT  (1u << 5)
+#define PIPV6_ICMP_NOHOST_SERVER  (1u << 6)
 
 
 void process_ip_header(struct context *c, unsigned int flags, struct buffer *buf,

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6d42c67b8dc5512933bed482bd9c2be80c63e993
Gerrit-Change-Number: 1108
Gerrit-PatchSet: 11
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#7 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email )

Change subject: forward: Make sure pip flags are treated as unsigned
......................................................................

forward: Make sure pip flags are treated as unsigned

process_ip_header already expects them to be unsigned, make sure the flags are to avoid spurious conversion warnings.

Change-Id I6d42c67b8dc5512933bed482bd9c2be80c63e993

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32740.html

---
M src/openvpn/forward.h

1 file changed, 7 insertions(+), 7 deletions(-)
src/openvpn/forward.h +7 -7
index d564149..79d0f8b 100644
@@ -314,13 +314,13 @@
  */
 void reschedule_multi_process(struct context *c);
 
-#define PIPV4_PASSTOS             (1 << 0)
-#define PIP_MSSFIX                (1 << 1) /* v4 and v6 */
-#define PIP_OUTGOING              (1 << 2)
-#define PIPV4_EXTRACT_DHCP_ROUTER (1 << 3)
-#define PIPV4_CLIENT_NAT          (1 << 4)
-#define PIPV6_ICMP_NOHOST_CLIENT  (1 << 5)
-#define PIPV6_ICMP_NOHOST_SERVER  (1 << 6)
+#define PIPV4_PASSTOS             (1u << 0)
+#define PIP_MSSFIX                (1u << 1) /* v4 and v6 */
+#define PIP_OUTGOING              (1u << 2)
+#define PIPV4_EXTRACT_DHCP_ROUTER (1u << 3)
+#define PIPV4_CLIENT_NAT          (1u << 4)
+#define PIPV6_ICMP_NOHOST_CLIENT  (1u << 5)
+#define PIPV6_ICMP_NOHOST_SERVER  (1u << 6)
 
 
 void process_ip_header(struct context *c, unsigned int flags, struct buffer *buf,

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1108?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6d42c67b8dc5512933bed482bd9c2be80c63e993
Gerrit-Change-Number: 1108
Gerrit-PatchSet: 11
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged